<!DOCTYPE html>
<html lang="en">

<head>
       
    <meta charset="UTF-8">
       
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
       
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>
        .box {
            width: 100px;
            height: 100px;
            background-color: bisque;
            position: absolute;
        }
    </style>
</head>

<body>
        <button class="start">开始</button>
        <button class="stop">结束</button>
        <div class="box"></div>

       
    <script src="./utils.js"></script>
       
    <script>


        var start = $('.start');
        var stop = $('.stop');
        var box = $('.box');
        var posLeft = 1;

        start.onclick = function () {
            setInterval(function () {
                posLeft++;
                box.style.left = posLeft + "px"

            }, 500)

        }




    </script>

</body>

</html>